package com.milepost.workflow.common.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * @author huarf
 * @Description
 * @create 2022-03-25 0:11
 */
public class BootstrapTableVo<T> {

    private Long total;
    private Long totalNotFiltered;
    private List<T> rows;

    public Long getTotal() {

        return total;
    }

    public void setTotal(Long total) {

        this.total = total;
    }

    public Long getTotalNotFiltered() {

        return totalNotFiltered;
    }

    public void setTotalNotFiltered(Long totalNotFiltered) {

        this.totalNotFiltered = totalNotFiltered;
    }

    public List<T> getRows() {

        return rows;
    }

    public void setRows(List<T> rows) {

        this.rows = rows;
    }

    public BootstrapTableVo(Page<T> page) {

        this.total = page.getTotal();
        this.totalNotFiltered = page.getTotal();
        this.rows = page.getRecords();
    }

}
